# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SavedQuery do
  @moduledoc """
  A SavedQuery is a view of the dataset. It references a subset of annotations by problem type and filters.

  ## Attributes

  *   `annotationFilter` (*type:* `String.t`, *default:* `nil`) - Output only. Filters on the Annotations in the dataset.
  *   `annotationSpecCount` (*type:* `integer()`, *default:* `nil`) - Output only. Number of AnnotationSpecs in the context of the SavedQuery.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this SavedQuery was created.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Required. The user-defined name of the SavedQuery. The name can be up to 128 characters long and can consist of any UTF-8 characters.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Used to perform a consistent read-modify-write update. If not set, a blind "overwrite" update happens.
  *   `metadata` (*type:* `any()`, *default:* `nil`) - Some additional information about the SavedQuery.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Output only. Resource name of the SavedQuery.
  *   `problemType` (*type:* `String.t`, *default:* `nil`) - Required. Problem type of the SavedQuery. Allowed values: * IMAGE_CLASSIFICATION_SINGLE_LABEL * IMAGE_CLASSIFICATION_MULTI_LABEL * IMAGE_BOUNDING_POLY * IMAGE_BOUNDING_BOX * TEXT_CLASSIFICATION_SINGLE_LABEL * TEXT_CLASSIFICATION_MULTI_LABEL * TEXT_EXTRACTION * TEXT_SENTIMENT * VIDEO_CLASSIFICATION * VIDEO_OBJECT_TRACKING
  *   `supportAutomlTraining` (*type:* `boolean()`, *default:* `nil`) - Output only. If the Annotations belonging to the SavedQuery can be used for AutoML training.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when SavedQuery was last updated.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :annotationFilter => String.t() | nil,
          :annotationSpecCount => integer() | nil,
          :createTime => DateTime.t() | nil,
          :displayName => String.t() | nil,
          :etag => String.t() | nil,
          :metadata => any() | nil,
          :name => String.t() | nil,
          :problemType => String.t() | nil,
          :supportAutomlTraining => boolean() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:annotationFilter)
  field(:annotationSpecCount)
  field(:createTime, as: DateTime)
  field(:displayName)
  field(:etag)
  field(:metadata)
  field(:name)
  field(:problemType)
  field(:supportAutomlTraining)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SavedQuery do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SavedQuery.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SavedQuery do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
